package com.yale.elasticsearch.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * @author :yale
 * @date : 2024/8/7
 */
@Data
@ApiModel(value = "MatchQueryDTO", description = "match查询参数")
public class MatchQueryDTO {
    @ApiModelProperty(value = "查询字段")
    private String field;
    @ApiModelProperty(value = "查询字段;多字段查询")
    private String[] fields;
    @ApiModelProperty(value = "查询值")
    private String value;
    @ApiModelProperty(value = "索引名称")
    @NotBlank(message = "索引名称不能为空")
    private String indexName;
    @ApiModelProperty(value = "排序;0:降序;1:升序")
    private Integer sort = 0;
}
